package com.crazy.web.interceptor.rest;

import cn.hutool.extra.spring.SpringUtil;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class APIInterceptor extends HandlerInterceptorAdapter {
 
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
			throws Exception {
		APIScopeHolder holder= SpringUtil.getBean(APIScopeHolder.class);
		holder.beginRequest();
		return super.preHandle(request, response, handler);
	}
 

}
